#!/bin/bash

[ "$1" == "" ] && echo "Usage: `basename $0` backup_file_full_path" && exit 1
echo $1 | grep "^/" >/dev/null
[ $? -ne 0 ] && echo "You need enter a absolute path!" && exit 2

# Package with bz2
tar cpjf $1 \
  --exclude=/proc \
  --exclude=/lost+found \
  --exclude=$1 \
  --exclude=/mnt \
  --exclude=/sys \
  --exclude=/pbfd \
  /

echo "`basename $0` completed!"
exit 0
